\titleformat*{\section}{\fontsize{16}{20}\bfseries}
\titleformat*{\subsection}{\fontsize{14}{20}\bfseries}
\titleformat*{\subsubsection}{\fontsize{12}{20}\bfseries}

\newcommand\BibTeX{B{\sc ib}\TeX}

\setlength{\parskip}{0em}
\setlength{\parindent}{0em}

% For Final Version Declare
\makeatletter
\newif\ifthesisfinal\thesisfinalfalse
\def\thesisfinalcopy{\global\thesisfinaltrue}
\makeatother
% end of final version declare

% For Final Version Declare
\newif\ifenableschoollogo\enableschoollogofalse
\def\enablelogo{\global\enableschoollogotrue}
% end of final version declare

% Header and Footer
\makeatletter
\newcommand\oddhead[1]{\gdef\@oddhead{\reset@font#1}}
\newcommand\evenhead[1]{\gdef\@evenhead{\reset@font#1}}
\newcommand\oddfoot[1]{\gdef\@oddfoot{\reset@font#1}}
\newcommand\evenfoot[1]{\gdef\@evenfoot{\reset@font#1}}
\makeatother
% End of Header and Footer

% Redesign maketitle
\makeatletter
\def\@maketitle{
    \fontsize{16}{20}\selectfont
    \newpage
    \null
    \begin{center}
    \ifenableschoollogo
    \begin{figure}[H]
      \centering
      \includegraphics[scale=0.3]{assets/uic-logo-encn.pdf}
    \end{figure}
    \vskip 2.0em
    \else
    \fi
    \let \footnote \thanks
    {
        \textbf{\@title} \par
    }
    {by \par}
    
    \ifenableschoollogo
    \vskip 1.0em
    \else
    \vskip 2.0em
    \fi
    {
      \lineskip .5em
      \begin{tabular}[t]{c}
        \underline{\@author}
      \end{tabular}\par}
      \vskip 0.5em
    {
        (\studentid) \par
    }
    \ifenableschoollogo
    \vskip 2.0em
    \else
    \vskip 3.0em
    \fi
    {
        A Final Year Project Thesis (COMP4004; 3 Credits)\par
    }
    {
        submitted in partial fulfillment of the requirements\\
        for the degree of
        \par
    }
    \ifenableschoollogo
    \vskip 2.0em
    \else
    \vskip 3.0em
    \fi
    {
        Bachelor of Science (Honours)\\
        in\\
        Computer Science and Technology
        \par
    }
    \vskip 1.0em
    {
        at\\
        BNU-HKBU\\
        UNITED INTERNATIONAL COLLEGE
        \par
    }
    \ifenableschoollogo
    \vskip 1.0em
    \else
    \vskip 3.0em
    \fi
    {
        \monthyeardate\today
        % NOT THE FINAL VERSION
        \ifthesisfinal\else 
        \bf \\ NOT FINAL VERSION, FOR REVIEW ONLY
        \fi\par
    }
    \end{center}%
    \par
}
\makeatother
% End of maketitle

% Redefine Abstraction Style

\renewenvironment{abstract}
 {\small
  \begin{center}
  \bfseries \MakeUppercase\abstractname\vspace{-.5em}\vspace{0pt}
  \end{center}
  \vskip 3em
  \list{}{%
    \setlength{\leftmargin}{0cm}
    \setlength{\rightmargin}{\leftmargin}%
  }%
  \item\relax}
 {\endlist}

% End of abstraction style

% Ack style
\newenvironment{acknowledgement}
  {\small
    \begin{center}
    \bfseries \MakeUppercase ACKNOWLEDGEMENT\vspace{-.5em}\vspace{0pt}
    \end{center}
    \vskip 3em
  }
  {}
% End of Ack style

% Redefine plain style, change Page number position
\makeatletter
\renewcommand*{\ps@plain}{%
  \let\@mkboth\@gobbletwo
  \let\@oddhead\@empty
  \def\@oddfoot{%
    \reset@font
    \footnotesize
    \hfil
    \thepage
    % \hfil % removed for aligning to the right
  }%
  \let\@evenhead\@empty
  \let\@evenfoot\@oddfoot
}
\makeatother
\pagestyle{plain}
% End of Redefine plain style, change page number position